package com.yunduansing.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author yunduansing
 * @since 2020-05-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_depart")
@ApiModel(value="DepartEntity对象", description="部门表")
public class DepartEntity implements Serializable,Comparable<DepartEntity> {

    private static final long serialVersionUID=1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String name;

    private Integer pid;

    private Integer seq;

    @ApiModelProperty(value = "0-启用、1-禁用、2-删除")
    private Integer status;

    @ApiModelProperty(value = "代码")
    private String code;

    @Override
    public int compareTo(DepartEntity o) {
        return this.seq-o.getSeq();
    }


}
